package com.superzlc.vcontroller;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;

public class TestView extends View {

	Paint paint;
	public TestView(Context context) {
		super(context);
		paint = new Paint();
		paint.setARGB(0x7f, 0xdf, 0x30, 0x30);
		paint.setStyle(Paint.Style.STROKE); //绘制空心圆
	}
	protected void onDraw(Canvas canvas) {
		canvas.drawColor(Color.rgb(0xcc, 0xcc, 0xee));
		// canvas.drawCircle(300, 400, 200, paint);
		canvas.drawText("hello superzlc 张玲昌", 100, 200, paint);

		int cx = 300;
		int cy = 400;
		int radius = 200;
		int ringWidth = 100;

//        //绘制内圆
        this.paint.setARGB(155, 167, 190, 206);
        this.paint.setStrokeWidth(2);
        canvas.drawCircle(cx,cy, radius, this.paint);
//
        //绘制圆环
        this.paint.setARGB(255, 212 ,225, 233);
        this.paint.setStrokeWidth(ringWidth);
        canvas.drawCircle(cx,cy, radius+1+ringWidth/2, this.paint);

        //绘制外圆
        this.paint.setARGB(155, 167, 190, 206);
        this.paint.setStrokeWidth(2);
        canvas.drawCircle(cx,cy, radius+ringWidth, this.paint);

	}


}
